import request from "@/utils/request";

// 获取套餐管理信息
export function getSetmenu(params) {
  return request({
    url: "setmeal/page",
    method: "get",
    params,
  });
}

export function getSetmenuCategoryName() {
  return request({
    url: "category/list?type=2",
    method: "get",
  });
}

export function getCategoryName() {
  return request({
    url: "category/list?type=1",
    method: "get",
  });
}

export function getDishListByCategoryIdId(params) {
  return request({
    url: "/dish/list",
    method: "get",
    params,
  });
}

export function addSetmenu(data) {
  return request({
    url: "/setmeal",
    method: "post",
    data,
  });
}

export function editSetmenu(data) {
  return request({
    url: "/setmeal",
    method: "put",
    data,
  });
}

export function getSetmenuById(id) {
  return request({
    url: `/setmeal/${id}`,
    method: "get",
  });
}


export function changeSetmenuStatus(status,params) {
  return request({
    url: `/setmeal/status/${status}`,
    method: "post",
    params
  });
}

export function DeleteSetmenu(params) {
  return request({
    url: `/setmeal`,
    method: "delete",
    params,
  });
}